package com.example.controller;

import com.example.service.SelfStatisticService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * Created by simon on 2018/11/28.
 */
@RestController
public class SelfStatisticController {

    @Autowired
    private SelfStatisticService selfStatisticService;

    @RequestMapping(value="api/selfCount/count",method = RequestMethod.POST)
    Map<String,Object> count(@RequestBody Map sqlmap){

        return selfStatisticService.selfCount(sqlmap.get("sqlstring")+"");
    }


}
